package iuhao.controller;

import iuhao.common.response.O2OJSON;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by yanhao on 2017/10/10.
 */

public class TestController {

    @ResponseBody
    @ApiOperation(value = "测试")
    @RequestMapping(value = "/test1", method = RequestMethod.GET)
    public O2OJSON jsonTest(HttpServletRequest request, HttpServletResponse response) {
        O2OJSON json = new O2OJSON();
        Map<Object, Object> map = new HashMap<>();
        map.put("iuhao",271285251);
        map.put("url","www.iuhao.cn");
        json.setData(map);

        return  json;
    }


}
